package cn.fsd.mapper;

import cn.fsd.domain.Commodity;
import cn.fsd.domain.Courier;
import cn.fsd.domain.Task;
import cn.fsd.query.substation.PaymentQuery;
import cn.fsd.query.substation.TaskQuery;
import cn.fsd.query.substation.WorkloadQuery;
import cn.fsd.vo.PaymentRecord;
import cn.fsd.query.substation.WorkloadBean;
import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface TaskMapper {

  int deleteByPrimaryKey(String task_id);

  int insert(Task record);

  Task selectByPrimaryKey(String task_id);

  List<Task> selectAll();

  int updateByPrimaryKey(Task record);

  List<Task> queryByStationFinDateTypeStatus(TaskQuery query);

  Integer getCourierTasks(@Param("station_id")String stationId,@Param("courier_id")String courierId);

  void updateCourier(Task task);

  List<Task> selectAllocatedTask(@Param("query") TaskQuery query,@Param("couriers") List<Courier> couriers);

  List<Task> getTaskByTypeCourierDate(@Param("query") TaskQuery query, @Param("couriers") List<Courier> couriers);

  void updateTaskStatus(@Param("taskId") String taskId,@Param("taskStatus") String taskStatus);

  List<PaymentRecord> queryPayment(@Param("query") PaymentQuery query,@Param("commodities") List<Commodity> commodities);

  void updateDeliveryDate(String taskId, Date date);

  List<WorkloadBean> queryWorkLoadByDate(WorkloadQuery query);
}